<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">

<TITLE>Command R - repair a damaged archive</TITLE>
<link href="style.css" rel="stylesheet" type="text/css">
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000">

<OBJECT TYPE="application/x-oleobject" CLASSID="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">

	<PARAM NAME="Keyword" VALUE="Commands: R - repair a damaged archive">

</OBJECT>

<P class="title"><A NAME="HELPCmdR"></A>Command <B>R</B> - repair
a damaged archive<hr></P>

<P>Archive repairing consists of two stages. First, the damaged archive
is scanned for <a href="HELPArcRecovery.htm">recovery record</a>
(see the <A HREF="HELPCmdRR.htm"><B>rr</B></A> command). If archive contains
the previously added recovery record and if damaged data area is continuous
and smaller than error correction code size in recovery record, chance of
successful archive reconstruction is high. When this stage has been
completed, a new archive is created, named as <I>fixed.arcname.rar</I>,
where 'arcname' is the original (damaged) archive name.</P>

<P>If damaged archive does not contain the recovery record or if archive
cannot be completely recovered due to severe damage, second stage is
performed. During this stage only the archive structure is reconstructed
and it is impossible to recover files which fail checksum validation,
but it is still possible to recover undamaged files which were inaccessible
due to a corrupt archive structure. Generally this is useful for non-solid
archives. In a damaged solid archive, often, only the first file may
be recovered during the second stage. This stage is not performed
for archives with encrypted file names, which can be repaired only
if recovery record is present.</P>

<P>When this stage has been completed, a new archive will be created,
named as <I>rebuilt.arcname.rar</I>, where 'arcname' is the original
archive name.</P>

<p>By default, repaired archives are created in the current folder,
but you can append an optional destpath\ parameter to specify another
destination folder.</p>

<P>This command is the command line equivalent of the <A HREF="HELPShellModes.htm">
file management</A> command <A HREF="HELPCommandsRepair.htm">Repair
archive</A>.</P>

<h1><B>Example</B></h1>

<p>repair buggy.rar and place the result to 'c:\fixed' folder</p>

<p class="sample">WinRAR r buggy.rar c:\fixed\</p>

</BODY>
</HTML>
